#pragma once

#include "Session.h"
#include "../../../src/thread/Mutex.h"
#include "../../../src/thread/SharedPtr.h"
#include <map>

namespace server
{
	using namespace LibTools;

	class SessionMgr
	{
	public:
		void DeleteSession(Session* s);

		void Insert(const SharedPtr<Session>& s);

	private:
		CMutex m_mutex;
		std::map<Session*, SharedPtr<Session> > m_sockets;
	};
}